Skip to content

feat: generate edit URLs from a build-time source map - #5617

Merged
yanglbme merged 1 commit into
docsfrom
feat/build-time-edit-map
Sep 12, 2026
Merged

yanglbme merged 1 commit into
docsfrom
feat/build-time-edit-map

Conversation

@yanglbme

Copy link
Copy Markdown
Member

Summary

  • Write docs/.edit_map.json / docs-en/.edit_map.json when flattening problem READMEs, mapping site pages back to their main source paths.
  • Resolve Material edit buttons and committer GitHub paths from that map instead of README edit_url frontmatter.
  • Strip leftover edit_url from copied pages so GitHub-facing source no longer needs the field.

Test plan

  • python -m unittest tests.test_edit_map tests.test_stay_on_page tests.test_conditional_mathjax (34 tests)
  • Deploy preview: problem pages still have working Edit / View links to main
  • Committer chips still resolve after a full build_site.py run
  • Range index / tags / home pages stay without an edit button

Merge this before the main PR that removes edit_url from problem READMEs.

Flattened pages now resolve GitHub edit links and committer paths from .edit_map.json instead of README frontmatter.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings September 12, 2026 05:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@idoocs idoocs added core team Issues or pull requests from core team gitignore py Issues or Pull requests relate to .py code labels Sep 12, 2026
@yanglbme
yanglbme merged commit be23ebe into docs Sep 12, 2026
2 checks passed
@yanglbme
yanglbme deleted the feat/build-time-edit-map branch September 12, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core team Issues or pull requests from core team gitignore py Issues or Pull requests relate to .py code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants